package com.dhl.command.light;

import com.dhl.command.Command;

/**
 * @title: LightOnCommand
 * @Author danghailiang
 * @Date: 2022/8/20 11:59
 * @Version 1.0
 */
public class LightOnCommand implements Command {
    private LightReceiver lightReceiver;
    public LightOnCommand(LightReceiver lightReceiver){
        super();
        this.lightReceiver = lightReceiver;
    }

    @Override
    public void execute() {
        lightReceiver.on();
    }

    @Override
    public void undo() {
        lightReceiver.off();
    }
}
